#include <iostream>

using namespace std;

class B0
{
public :
	B0(int n)
	{
		nv = n;
	}
	int nv;
	void fun()
	{
		cout << "Member of B0" << endl;
	}
};

class B1:virtual public B0
{
public:
	B1(int a):B0(a)
	{
		
	}
	int nv1;
};

class B2:virtual public B0
{
public:
	B2(int a):B0(a) {}
	int nv2;
};

class D1:public B1, public B2
{
public:
	D1(int a) : B0(a), B1(a), B2(a) {}
	int nvd;
	void fund()
	{
		cout << "Member of D1 " << endl;
	}
};

int main()
{
	D1 dl(1);
	dl.nv = 2;
	dl.fun();

	return 0;
}
